package cn.topcodes.tcsf.admin.domain.form;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
public class CreateSysUserForm implements Serializable {

	@NotBlank(message = "用户名不能为空")
    @Length(min = 1,max = 20,message = "用户名最大长度为20个字符")
	private String username;

    @Length(min = 1,max = 10,message = "真实姓名最大长度为10个字符")
    private String realName;

    @NotBlank(message = "密码不能为空")
    @Length(min = 1,max = 20,message = "密码最大长度为20个字符")
    private String password;

    @NotNull(message = "角色不能为空")
    private Long roleId;

}
